﻿package com.goas3.events 
{
	import flash.events.Event;
	/**
	* ...
	* @author Armando Leopoldo Keller
	*/
	public class LoginEvent extends Event 
	{
		public static const LOGIN_INIT:String     = "google_login_init";
		public static const LOGIN_COMPLETE:String = "google_login_complete";
		public static const LOGIN_ERROR:String    = "google_login_error";
		
		private var _erro:String;
		
		public function get erro():String
		{
			return this._erro;
		}
		
		public function LoginEvent(type:String,arg_erro:String="undefined",bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			if (type == LoginEvent.LOGIN_ERROR)
				_erro = arg_erro;
			else
				_erro = undefined;
			super(type);
		} 
		
		public override function clone():Event 
		{ 
			return new LoginEvent(type, erro ,bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("LoginEvent", "type","erro","bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}